1. Field of the Invention
The present invention relates to the field of computer network systems, and in particular, to a method and apparatus for asynchronous physical layer initialization performed by network adapter devices, such as an Ethernet card.
2. Background Information
Network-connected computers are common place today in many institutions, and even in homes with multiple computers. Among computer networks, the Ethernet is a popular option for establishing the network connections. The Ethernet sends its communications through radio frequency signals carried by a coaxial cable. Each computer connected to the Ethernet checks to see if another computer is transmitting and waits its turn to transmit. If two computers accidentally transmit at the same time and their messages collide, they wait and send again in turn. Software protocols used by Ethernet systems vary, but include Novell Netware and TCP/IP.
As with the initialization of most computer systems, an operating system is typically first loaded. Software drivers are then executed in order to operate the various hardware components installed on the system, such as sound cards, video cards, printers, and network adapters. Software drivers for a network adapter, like all software programs, require memory resources and take up a certain amount of time to load into memory.
The primary architectural model for network computing is the Open Systems Interconnection (OSI) reference model. The OSI model divides the tasks involved with moving information between networked computers into seven smaller, more manageable task groups. A task or group of tasks is then assigned to each of the seven OSI layers. Each layer is reasonably self-contained, so that the tasks assigned to each layer can be implemented independently. This independence allows the solutions offered by one layer to be updated without adversely affecting the other layers. The seven OSI model layers are: (1) the physical layer; (2) the data link layer; (3) the network layer; (4) the transport layer; (5) the session layer; (6) the presentation layer; and (7) the application layer.
The physical layer is related to the transmission of data over a medium. The data link layer relates to the packaging and transfer of packets of data. The network layer is related to routing packets, for example, over a wide-area network (WAN). The transport layer ensures that the data is delivered reliably, having functionality for flow control, multiplexing, virtual circuit management, and error checking and recovery. The session layer establishes, manages, and terminates the communication links over a network (between presentation layer entities). The presentation layer performs the code conversion for data presentation. Finally, the application layer performs the specialized user functions and interacts with the software applications that implement a communicating component. The application layer functions typically include identifying communication partners, determining resource availability, and synchronizing communication.
When a computer system is turned on, the operating system is generally first booted onto the system. Once the operating system takes control, software drivers for each hardware component (e.g., the video card, sound card, printer, network adapter, etc.) system must be loaded and initialized. When the network adapter driver is initializing the network adapter, the physical layer of the network adapter is usually initialized synchronously. That is, the physical layer initialization process performs a series of operations one at a time to prepare the computer system for connection to a network through the network adapter. However, during the physical layer initialization process, many operations are performed in software in order to work around any hardware issues that may present themselves. In order for the operations to work around the hardware issues, many of the operations involve a waiting period, such as reading from or writing to specific registers and then waiting for a specified amount of time. In such a process, time is wasted because all of the other software drivers of the computer system are blocked from execution until the entire physical layer initialization process is completed. Therefore, there is a substantial amount of xe2x80x9cwastedxe2x80x9d time when all of the other software drivers are blocked from execution. Accordingly, a faster and more efficient boot and initialization of a computer system is desirable.
According to an embodiment of the present invention, a method of asynchronous physical layer initialization includes scheduling a callback function. The callback function is used to perform functions of the physical layer initialization process that requires a waiting period. At least one other system software function is executed when the callback function encounters a waiting period. Whether the callback function was completed is determined after the at least one other system software function is executed. The callback function is rescheduled if the task of the callback function was not completed, and another callback function is scheduled if required to complete the physical layer initialization process. The above operations are repeated until callback functions are no longer required for the physical layer initialization process.